import request from '@/utils/request'

const pre = '/mock/'

export function listRules(data) {
  return request({
    url: `/fmea/common/rule/list`,
    method: 'get',
    params: data
  })
}

export function addRule(data) {
  return request({
    url: `/fmea/common/rule`,
    method: 'post',
    data: data
  })
}

export function getRuleById(data) {
  return request({
    url: `${pre}scoringRule/` + data.id,
    method: 'get'
  })
}

export function listSymbol(data) {
  return request({
    url: `${pre}/symbol/page`,
    method: 'get',
    params: data
  })
}

export function ruleDetails(data) {
  return request({
    url: `/fmea/common/rule/` + data.id,
    method: 'get'
  })
}
export function deleteRules(ids) {
  return request({
    url: `/fmea/common/rule/` + ids,
    method: 'delete'
  })
}
export function editRule(data) {
  return request({
    url: `/fmea/common/rule`,
    method: 'put',
    data: data
  })
}

export function getCustomer(data) {
  return request({
    url: `${pre}customer/page`,
    method: 'get',
    params: data
  })
}

